import { Component, Sprite, SpriteFrame, _decorator } from "cc"
const {ccclass, property} = _decorator
@ccclass
export default class MovieClip extends Component{
    @property(SpriteFrame)
    private splist:SpriteFrame[] = [];
    private _index:number = 0;
    gotoAndStop(index:number):void{
        this._index = index;
        this.node.getComponent(Sprite).spriteFrame = this.splist[index];
    }
    getCurrentIndex():number{
        return this._index;
    }
}